package com.metis.document.parse.dialog.pipeline.impl;

import com.github.houbb.opencc4j.util.ZhConverterUtil;
import com.metis.document.parse.dialog.pipeline.TextPostProcess;
import com.metis.document.parse.dialog.pipeline.TitleTextPostProcess;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * 繁简体转换
 */
@Slf4j
@Component
@Order(Ordered.HIGHEST_PRECEDENCE)
public class ZhConvertPostProcess implements TextPostProcess , TitleTextPostProcess {
    @Override
    public String process(@NotNull String input) {
        return ZhConverterUtil.convertToSimple(input);
    }
}
